home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ADSPSecure.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __ADSPSECURE__
- #define __ADSPSECURE__
-
- #ifndef __ADSP__
- #include <ADSP.h>
- /* #include <AppleTalk.h> */
- /* #include <Types.h> */
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- /* #include <OSUtils.h> */
- #endif
-
- #ifndef __FILES__
- #include <Files.h>
- /* #include <SegLoad.h> */
- #endif
-
- #ifndef __OCE__
- #include "OCE.h"
- /* #include <Aliases.h> */
- /* #include <AppleEvents.h> */
- /* #include <Memory.h> */
- /* #include <Events.h> */
- /* #include <Quickdraw.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- /* #include <EPPC.h> */
- /* #include <PPCToolBox.h> */
- /* #include <Processes.h> */
- /* #include <Notification.h> */
- /* #include <Script.h> */
- #endif
-
- #ifndef __OCEAUTHDIR__
- #include "OCEAuthDir.h"
- #endif
-
- #ifndef __TYPES__
- #endif
-
- /* New ADSP control codes */
-
- enum {
- sdspOpen = 229
- };
-
- /*
- For secure connections, the eom field of ioParams contains two single-bit flags
- (instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
- eom flag. All other bits in that field should be zero.
-
- To write an encrypted message, you must set an encrypt bit in the eom field of
- the ioParams of your write call. Note: this flag is only checked on the first
- write of a message (the first write on a connection, or the first write following
- a write with eom set.
- */
-
- enum {
- dspEOMBit,
- dspEncryptBit
- };
-
- enum {
- dspEOMMask = 1 << dspEOMBit,
- dspEncryptMask = 1 << dspEncryptBit
- };
-
- /*
- Define an ADSPSecure parameter block, as used for the secure Open call.
- */
-
- #define sdspWorkSize 2048
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TRSecureParams {
- unsigned short localCID;
- unsigned short remoteCID;
- AddrBlock remoteAddress;
- AddrBlock filterAddress;
- unsigned long sendSeq;
- unsigned short sendWindow;
- unsigned long recvSeq;
- unsigned long attnSendSeq;
- unsigned long attnRecvSeq;
- unsigned char ocMode;
- unsigned char ocInterval;
- unsigned char ocMaximum;
- Boolean secure;
- AuthKeyPtr sessionKey;
- unsigned long credentialsSize;
- Ptr credentials;
- Ptr workspace;
- AuthIdentity recipient;
- UTCTime issueTime;
- UTCTime expiry;
- RecordIDPtr initiator;
- Boolean hasIntermediary;
- RecordIDPtr intermediary;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TRSecureParams TRSecureParams;
-
- typedef struct SDSPParamBlock SDSPParamBlock;
- typedef SDSPParamBlock *SDSPPBPtr;
-
- /*
- SDSPIOCompletionProcs cannot be written in or called from a high-level
- language without the help of mixed mode or assembly glue because they
- use the following parameter-passing convention:
-
- typedef pascal void (*SDSPIOCompletionProcPtr)(SDSPPBPtr paramBlock);
-
- In:
- => paramBlock A0.L
- Out:
- none
- */
-
- enum {
- uppSDSPIOCompletionProcInfo = kRegisterBased|REGISTER_ROUTINE_PARAMETER(1,kRegisterA0,kFourByteCode)
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef pascal void (*SDSPIOCompletionProcPtr)(SDSPPBPtr paramBlock);
-
- typedef UniversalProcPtr SDSPIOCompletionUPP;
-
- #define CallSDSPIOCompletionProc(userRoutine, paramBlock) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppSDSPIOCompletionProcInfo, (paramBlock))
-
- #define NewSDSPIOCompletionProc(userRoutine) \
- (SDSPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
- uppSDSPIOCompletionProcInfo, GetCurrentISA())
-
- #else
- typedef ProcPtr SDSPIOCompletionUPP;
-
- #define NewSDSPIOCompletionProc(userRoutine) \
- (SDSPIOCompletionUPP)((userRoutine))
-
- #endif
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SDSPParamBlock {
- struct QElem *qLink;
- short qType;
- short ioTrap;
- Ptr ioCmdAddr;
- SDSPIOCompletionUPP ioCompletion;
- OSErr ioResult;
- char *ioNamePtr;
- short ioVRefNum;
- short ioCRefNum;
- short csCode;
- long qStatus;
- short ccbRefNum;
- union {
- TRinitParams initParams;
- TRopenParams openParams;
- TRcloseParams closeParams;
- TRioParams ioParams;
- TRattnParams attnParams;
- TRstatusParams statusParams;
- TRoptionParams optionParams;
- TRnewcidParams newCIDParams;
- TRSecureParams secureParams;
- } u;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
-
- #endif
-
-